package org.grayrabbit.cms.entity;

// Generated 2011-5-16 13:39:30 by Hibernate Tools 3.3.0.GA

import java.util.Arrays;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * CmsContentAttach generated by hbm2java
 */
@Entity
@Table(name = "CMS_CONTENT_ATTACH")
public class ContentAttach implements java.io.Serializable {

	private static final long serialVersionUID = 4702911853384747112L;
	public static final List<String> PICTURE_EXTS = Arrays.asList("jpg","gif","png","bmp","jpge");
	private String attachId;
	private Content content;
	private String attachName;
	private String attachType;
	private String attachExt;
	private String attachUrl;
	private Integer attachSize;
	private String attachMemo;
	private Integer attachDownloadNum;
	private Boolean focusPic;
	
	//二期
	private String uploadRealName;//上传人姓名
	private String uploadLoginName;//上传人登录名
	private Date uploadTime;//上传时间
	private String uploadOriginName;//附件原名
	//end
	public ContentAttach() {
	}

	public ContentAttach(String attachId) {
		this.attachId = attachId;
	}

	@Id
	@Column(name = "ATTACH_ID", unique = true, nullable = false, length = 32)
	@GeneratedValue(generator = "paymentableGenerator")       
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 
	public String getAttachId() {
		return this.attachId;
	}

	public void setAttachId(String attachId) {
		this.attachId = attachId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CONTENT_ID")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@Column(name = "ATTACH_NAME", length = 64)
	public String getAttachName() {
		return this.attachName;
	}

	public void setAttachName(String attachName) {
		this.attachName = attachName;
	}

	@Column(name = "ATTACH_TYPE", length = 32)
	public String getAttachType() {
		return this.attachType;
	}

	public void setAttachType(String attachType) {
		this.attachType = attachType;
	}

	@Column(name = "ATTACH_EXT", length = 64)
	public String getAttachExt() {
		return this.attachExt;
	}

	public void setAttachExt(String attachExt) {
		this.attachExt = attachExt;
	}

	@Column(name = "ATTACH_URL", length = 256)
	public String getAttachUrl() {
		return this.attachUrl;
	}

	public void setAttachUrl(String attachUrl) {
		this.attachUrl = attachUrl;
	}

	@Column(name = "ATTACH_SIZE", precision = 6, scale = 0)
	public Integer getAttachSize() {
		return this.attachSize;
	}

	public void setAttachSize(Integer attachSize) {
		this.attachSize = attachSize;
	}

	@Column(name = "ATTACH_MEMO", length = 512)
	public String getAttachMemo() {
		return this.attachMemo;
	}

	public void setAttachMemo(String attachMemo) {
		this.attachMemo = attachMemo;
	}

	@Column(name = "ATTACH_DOWNLOAD_NUM", precision = 6, scale = 0)
	public Integer getAttachDownloadNum() {
		return this.attachDownloadNum;
	}

	public void setAttachDownloadNum(Integer attachDownloadNum) {
		this.attachDownloadNum = attachDownloadNum;
	}

	@Column(name = "FOCUS_PIC", precision = 1, scale = 0)
	public Boolean getFocusPic() {
		return focusPic;
	}

	public void setFocusPic(Boolean focusPic) {
		this.focusPic = focusPic;
	}

	@Column(name = "UPLOAD_REAL_NAME", length = 32)
	public String getUploadRealName() {
		return uploadRealName;
	}

	public void setUploadRealName(String uploadRealName) {
		this.uploadRealName = uploadRealName;
	}

	@Column(name = "UPLOAD_LOGIN_NAME", length = 32)
	public String getUploadLoginName() {
		return uploadLoginName;
	}

	public void setUploadLoginName(String uploadLoginName) {
		this.uploadLoginName = uploadLoginName;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPLOAD_TIME", length = 7)
	public Date getUploadTime() {
		return uploadTime;
	}

	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}

	@Column(name = "ATTACH_ORIGIN_NAME", length = 32)
	public String getUploadOriginName() {
		return uploadOriginName;
	}

	public void setUploadOriginName(String uploadOriginName) {
		this.uploadOriginName = uploadOriginName;
	}

	
}
